clear all;
clc;
x =0:0.01:0.3;
n=100;
p=0.8;
a1=-1.184744206;
a2=-1.357089041;
Z=3.9;
tt=a1-x.*Z;
zz=sqrt(1-x.^2);
xxxx=tt./zz;
q1=normcdf(xxxx,0,1);
q2=normcdf((a2-x.*Z)./sqrt(1-x.^2),0,1);
pz=q1-q2;
y=n*(p-pz).^2./(pz.*(1-pz));
plot(x,y,'*');

